package com.dj.product.k2faas.service.datasource;

import com.dj.product.k2faas.dto.datasource.AbstractDataSourceRequest;
import com.dj.product.k2faas.dto.datasource.CreateDataSourceRequest;
import com.dj.product.k2faas.dto.datasource.DataSourceResponse;
import com.dj.product.k2faas.dto.datasource.UpdateDataSourceRequest;
import com.dj.product.k2faas.common.enums.DataStatus;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * Created by 丁建 on 2025/9/23 09:27
 *
 * @author 丁建
 */
public interface DataSourceService {

    void testDataSource(AbstractDataSourceRequest request);

    long add(CreateDataSourceRequest dataSource);

    void edit(UpdateDataSourceRequest dataSource);

    DataSourceResponse findById(long id);

    Page<DataSourceResponse> findAll(String keyword, Pageable pageable);

    void changeStatus(long id, DataStatus dataStatus);

    void setAsDefault(long id);
}
